/*
 * @Author: wangc
 * @Date: 2020-08-09 18:11:49
 * @LastEditTime: 2020-08-09 18:54:09
 * @Description: 
 * 响应报文接口
 * 接口响应至少需要告诉使用方三项信息：状态码、描述、数据
 */
package com.example.util;
/**
 * 响应报文接口
 * <p>接口响应至少需要告诉使用方三项信息：状态码、描述、数据</p>
 */
public class RespEntity {
    private int code;
    private String msg;
    private Object data;

    public RespEntity(RespCode respCode) {
        this.code = respCode.getCode();
        this.msg = respCode.getMsg();
    }

    public RespEntity(RespCode respCode, Object data) {
        this(respCode);
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
